package org.example.annotation.swagger;

import org.example.annotation.swagger.Api;
import org.example.annotation.swagger.ApiOperation;
import org.example.annotation.swagger.ApiParam;

/**
 * @author: ZhuYouBin
 * @date: 2022/4/9 10:15
 * @description:
 */
@Api(tags = "注解测试控制器")
public class TestAnnotationController {

    @ApiOperation(value = "新增用户", notes = "这个createUser()方法的作用是新增一个用户数据")
    public String createUser(@ApiParam(value = "用户ID", required = true) String uid,
                             @ApiParam(value = "用户名称", required = true) String uname,
                             @ApiParam(value = "用户密码", required = false) String password) {
        System.out.println("方法参数: " + uid);
        System.out.println("方法参数: " + uname);
        System.out.println("方法参数: " + password);
        return "创建成功.";
    }
}
